package com.hy;

import java.io.*;
import java.util.Arrays;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/5/9
 * Time: 10:36
 */
public class Test {
    
    public static void main(String[] args) {
        File file = new File("D:\\code\\code-notes\\other\\src\\main\\resources\\test.txt");
        BufferedReader reader = null;
        String[] split = null;
        try {
            // 打开文件
            reader = new BufferedReader(new FileReader(file));
        
            // 读取文件内容
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
                split = line.split("\t");
                break;
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            // 关闭文件
            try {
                if (reader != null)
                    reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        System.out.println(Arrays.toString(split));
        System.out.println(split.length);
        System.out.println(split[4112]);
    }
}
